<template>
    <div>
        <input type="date" v-model="date" />
        <h1>{{ date }}</h1>
        <h1>{{ formatDate }}</h1>
    </div>
</template>

<script>
    export default {
        name: "MonentDemo",
        data() {
            return {
                date: new Date()
            };
        },
        computed: {
            formatDate: function () {
                let moment = this.$moment(this.date);
                return moment.format('YYYY-MM-DD HH:mm:ss');
            }
        }
    }
</script>

<style scoped>

</style>